<?php

	$num_per_page = 10;
	
	if(is_numeric($this->getParams()))
		$page_no = $this->getParams() - 1;
	else
		$page_no = 0;
	
	$this->view()->assign('page_no', $page_no);
	
	$posts = PostMapper::get()->findByDate($page_no * $num_per_page, $num_per_page);
	$this->view()->assignRef('posts', $posts);
	$this->view()->assign('section', 'home');

	$post_plugin = Plugin::load('post', true);
	$this->view()->assignRef('post_plugin', $post_plugin);
	
	$this->addInclude('app/css/areas/home.css','css');

?>